package com.ha.system.promote.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ha.system.promote.mapper.HaHousePromoteMapper;
import com.ha.system.promote.domain.HaHousePromote;
import com.ha.system.promote.service.IHaHousePromoteService;
import com.ha.common.core.text.Convert;

/**
 * 好房推荐Service业务层处理
 * 
 * @author admin
 * @date 2021-03-16
 */
@Service
public class HaHousePromoteServiceImpl implements IHaHousePromoteService 
{
    @Autowired
    private HaHousePromoteMapper haHousePromoteMapper;

    /**
     * 查询好房推荐
     * 
     * @param id 好房推荐ID
     * @return 好房推荐
     */
    @Override
    public HaHousePromote selectHaHousePromoteById(Long id)
    {
        return haHousePromoteMapper.selectHaHousePromoteById(id);
    }

    /**
     * 查询好房推荐列表
     * 
     * @param haHousePromote 好房推荐
     * @return 好房推荐
     */
    @Override
    public List<HaHousePromote> selectHaHousePromoteList(HaHousePromote haHousePromote)
    {
        return haHousePromoteMapper.selectHaHousePromoteList(haHousePromote);
    }

    /**
     * 新增好房推荐
     * 
     * @param haHousePromote 好房推荐
     * @return 结果
     */
    @Override
    public int insertHaHousePromote(HaHousePromote haHousePromote)
    {
        return haHousePromoteMapper.insertHaHousePromote(haHousePromote);
    }

    /**
     * 修改好房推荐
     * 
     * @param haHousePromote 好房推荐
     * @return 结果
     */
    @Override
    public int updateHaHousePromote(HaHousePromote haHousePromote)
    {
        return haHousePromoteMapper.updateHaHousePromote(haHousePromote);
    }

    /**
     * 删除好房推荐对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteHaHousePromoteByIds(String ids)
    {
        return haHousePromoteMapper.deleteHaHousePromoteByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除好房推荐信息
     * 
     * @param id 好房推荐ID
     * @return 结果
     */
    @Override
    public int deleteHaHousePromoteById(Long id)
    {
        return haHousePromoteMapper.deleteHaHousePromoteById(id);
    }
}
